-- GENERATED SPELL FOR [Bonechewer Spectator] --


function spell0_23223(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(36140,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23223', 582, 1)
end

function spell1_23223(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40505,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23223', 597, 1)
end

function spell2_23223(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(8269,pUnit)
pUnit:RegisterEvent('Sorts_23223', 642, 1)
end

function spell3_23223(pUnit, Event) --@Mortal Wound,Heal--
pUnit:FullCastSpellOnTarget(25646,pUnit)
pUnit:RegisterEvent('Sorts_23223', 15280, 1)
end

function spell4_23223(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(13446,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23223', 575, 1)
end

function spell5_23223(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(13444,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23223', 30272, 1)
end

function Sorts_23223(pUnit, Event)
local choix_sorts_23223 = math.random(0, 5)
if choix_sorts_23223 == 0 then
pUnit:RegisterEvent('spell0_23223', 1, 1)
end
if choix_sorts_23223 == 1 then
pUnit:RegisterEvent('spell1_23223', 1, 1)
end
if choix_sorts_23223 == 2 then
pUnit:RegisterEvent('spell2_23223', 1, 1)
end
if choix_sorts_23223 == 3 then
pUnit:RegisterEvent('spell3_23223', 1, 1)
end
if choix_sorts_23223 == 4 then
pUnit:RegisterEvent('spell4_23223', 1, 1)
end
if choix_sorts_23223 == 5 then
pUnit:RegisterEvent('spell5_23223', 1, 1)
end
end

function mob23223_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23223', math.random(1500, 3000), 1)
end

function mob23223_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23223_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23223_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23223, 1, 'mob23223_Action')
RegisterUnitEvent(23223, 2, 'mob23223_Leave')
RegisterUnitEvent(23223, 3, 'mob23223_Kill')
RegisterUnitEvent(23223, 4, 'mob23223_Die')
